<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title><?php echo $data['sname'];?> - 哇塞网</title>
	<link href="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/ico/favicon.ico" rel="shortcut icon" />
	<link rel="stylesheet" type="text/css" href="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/css/content.css"/>
	<link rel="stylesheet" type="text/css" href="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/css/common.css"/>
	<script src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/js/jquery-1.7.2.min.js" type="text/javascript"></script>	
	<script type="text/javascript">
		$(function(){
			//减少购买数量
			$('.shop_num .minus').click(function(){
				var num = $('#numerate').val();
				num = Number(num);
				if(num==1){
					alert('购买数量不能小于1');
					$('#numerate').val() = Number(1);
				}
				$('#numerate').val(--num); 
			});	
			//增加购买数量
			$('.shop_num .plus').click(function(){
				var num = $('#numerate').val();
				num = Number(num);
				$('#numerate').val(++num); 
			});			
			//商品内容页选中规格效果
			$('.shop_spec ul li').click(function(){
				$(this).siblings('li').removeClass('green');
				$(this).siblings('li').find('.duigou').hide();
				$(this).addClass('green');
				$(this).find('.duigou').show();
				//点击中两个之后做处理
				if($('.green').length>=2){
					var specId = '';
					$.each($('.green'), function() {    
						 specId += $(this).attr('specId') + ',';                                                       
					});
					
					$.ajax({
						type:"post",
						url:"<?php echo U('Content/getSpec');?>",
						data:{specId : specId},
						dataType:'json',
						success:function(phpData){
							if(phpData!=0){
								num=Number(phpData);
								$('.number').html(num);
							}else{
								alert('抱歉:)暂时没有库存');
								$('.number').html(0);
							}
						}
					});
				}
			});			
		})
	</script>
</head>
<body>
	<!--载入公共头部-->
	<?php if(!defined('HDPHP_PATH'))exit;C('SHOW_NOTICE',FALSE);?>
	<!--登陆注册/购物车部分 -->
	<div class="top fl">
		<div class="logins">
			    <?php if(!$_SESSION['uid']){ ?>
			<div class="logins-left fl">
				<a href="<?php echo U('Index/Login/index');?>">登录</a>
				<a href="<?php echo U('Index/Login/register');?>">注册</a>
			</div>
			<?php }else{ ?>
			<div class="user fl">
				<a href=""><img src="<?php echo $_SESSION['face'];?>"/></a>
				<span><?php echo $_SESSION['username'];?></span>
				<a href="<?php echo U('Index/Login/out');?>" class="out">退出</a>
			</div>
			<?php } ?>
			<div class="buycar fr">
				<div class="buycar-left fl">
					<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/ico/buycar.png" alt="" />
				</div>
				<a href="#">购物车<span class="num">0</span>件</a>
			</div>
		</div>
	</div>
	<!--end-->
	
	<!--首页分类/logo/搜索栏部分-->
	<div class="header fl">
		<div class="classification">
			<div class="house fl">
				<a href="<?php echo U('Index/index');?>"></a>
			</div>
			<!--左侧分类-->
			<ul class="classA fl">
				<li><a href="<?php echo U('Category/index');?>">市集</a></li>
				<li><a href="">新品</a></li>
				<li><a href="">热卖</a></li>
				<li><a href="">闪购</a></li>
				<li><a href="">定制</a></li>
			</ul>
			<!--logo-->
			<div class="logo">
				<a href="<?php echo U('Index/index');?>"><img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/ico/logo.png"/></a>
			</div>
			<form action="" method="post" class="search fr">
				<input type="text" placeholder="请输入要搜索的关键词" class="text"/>
				<input type="submit" value="" class="submit"/>
			</form>
			<!--右侧分类-->
			<ul class="classB">
				<li><a href="">动态</a></li>
				<li><a href="">画报</a></li>
				<li><a href="">画报</a></li>
			</ul>
		</div>
	</div>
	<!--end-->




	
	<!--商品内容部分-->
	<div class="content fl">
		<div class="content_in">
			<div class="ranking fl">
				<div class="love_hot">
					<a href="javascript:;" class="love">
						<div class="green_line"></div>
						<span>最爱排行</span>
					</a>
					<a href="javascript:;" class="hot">
						<div class="green_line"></div>
						<span>热销排行</span>
					</a>
				</div>
				<div class="love_shop">
					<div class="love_in">
						<div class="love_rows">
							<div class="pic_out">
								<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/shop/wsmal.jpg" alt="" />
							</div>
							<div class="love_right">
								<a href="" class="love_title">沭朴 春款原创日系韩版情... </a>
								<span class="love_price">￥89.00</span>
							</div>
						</div>
						<div class="love_rows">
							<div class="pic_out">
								<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/shop/wsmal.jpg" alt="" />
							</div>
							<div class="love_right">
								<a href="" class="love_title">沭朴 春款原创日系韩版情... </a>
								<span class="love_price">￥89.00</span>
							</div>
						</div>
						<div class="love_rows">
							<div class="pic_out">
								<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/shop/wsmal.jpg" alt="" />
							</div>
							<div class="love_right">
								<a href="" class="love_title">沭朴 春款原创日系韩版情... </a>
								<span class="love_price">￥89.00</span>
							</div>
						</div>
						<div class="love_rows">
							<div class="pic_out">
								<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/shop/wsmal.jpg" alt="" />
							</div>
							<div class="love_right">
								<a href="" class="love_title">沭朴 春款原创日系韩版情... </a>
								<span class="love_price">￥89.00</span>
							</div>
						</div>
						<div class="love_rows">
							<div class="pic_out">
								<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/shop/wsmal.jpg" alt="" />
							</div>
							<div class="love_right">
								<a href="" class="love_title">沭朴 春款原创日系韩版情... </a>
								<span class="love_price">￥89.00</span>
							</div>
						</div>
						<div class="love_rows">
							<div class="pic_out">
								<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/shop/wsmal.jpg" alt="" />
							</div>
							<div class="love_right">
								<a href="" class="love_title">沭朴 春款原创日系韩版情... </a>
								<span class="love_price">￥89.00</span>
							</div>
						</div>
						<div class="love_rows">
							<div class="pic_out">
								<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/shop/wsmal.jpg" alt="" />
							</div>
							<div class="love_right">
								<a href="" class="love_title">沭朴 春款原创日系韩版情... </a>
								<span class="love_price">￥89.00</span>
							</div>
						</div>
						<div class="love_rows">
							<div class="pic_out">
								<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/shop/wsmal.jpg" alt="" />
							</div>
							<div class="love_right">
								<a href="" class="love_title">沭朴 春款原创日系韩版情... </a>
								<span class="love_price">￥89.00</span>
							</div>
						</div>	
						<div class="love_rows">
							<div class="pic_out">
								<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/shop/wsmal.jpg" alt="" />
							</div>
							<div class="love_right">
								<a href="" class="love_title">沭朴 春款原创日系韩版情... </a>
								<span class="love_price">￥89.00</span>
							</div>
						</div>
						<div class="love_rows">
							<div class="pic_out">
								<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/shop/wsmal.jpg" alt="" />
							</div>
							<div class="love_right">
								<a href="" class="love_title">沭朴 春款原创日系韩版情... </a>
								<span class="love_price">￥89.00</span>
							</div>
						</div>							
					</div>
				</div>
			</div>
			<!--右边商品介绍-->
			<div class="content_right fr">
				<div class="con_top">
					<div class="shop_pic">
						<img src="http://127.0.0.1/hdwy/wasai/<?php echo $detail['big'];?>" alt="" />
					</div>
					<div class="shop_right">
						<div class="shop_title">
							<p><?php echo $data['sname'];?></p>
						</div>
						<div class="shop_price">
							<span class="mingc">价格:</span><span class="yang">￥<?php echo $data['shopprice'];?></span>
						</div>
						<div class="shop_pingj">
							<span class="mingc">评价:</span><span class="goodp">好评率100.00% | <a href="">已有10条评价</a></span>
						</div>
						<?php foreach ($spec as $k=>$v){?>
							<div class="shop_spec">
								<span class="mingc"><?php echo $v['name'];?>:</span>
								<ul>
									<?php foreach ($v[value] as $kk=>$vv){?>
									<li specId="<?php echo $vv['said'];?>"><?php echo $vv['savalue'];?><img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/ico/duigou.gif" class="duigou"/></li>
									<?php }?>
								</ul>
							</div>
						<?php }?>
						<form action="" method="post">
							<div class="shop_num">
								<span class="mingc">购买数量:</span>
								<div>
									<div class="shop_num_r">
										<a href="javascript:;" class="minus"></a>
										<input type="text" name="num" value="1" class="num" id="numerate"/>
										<a href="javascript:;" class="plus"></a>
										<span class="kucun">库存</span><span class="number">    <?php if($count){ ?><?php echo $count;?><?php }else{ ?>0<?php } ?></span><span class="unit"><?php echo $data['unit'];?></span>
									</div>
								</div>
							</div>
							<div class="shop_btn">
								<input type="submit" class="sub" value="加入购物车"/>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	<!--end-->
	
	
	
	
	<!--更多精彩-->
	<div class="more_out fl">
		<div class="cin"></div>
		<div class="more_in">
			<div class="more_top"></div>
			<div class="morejingcai">
				<p>更多精彩</p>
				<ul>
					<li><a href="">闪购</a></li>
					<li><a href="">新品</a></li>
					<li><a href="">热卖</a></li>
					<li><a href="">礼物</a></li>
					<li><a href="">品牌</a></li>
				</ul>
			</div>
			<div class="women">
				<p>我们承诺</p>
				<ul>
					<li><span>100%原创设计</span></li>
					<li><span>365天不打烊</span></li>
					<li><span>无理由退换货(除定制)</span></li>
					<li><span>担保交易</span></li>
					<li><span>先行赔付</span></li>
					<li><span>支持定制</span></li>
				</ul>
			</div>
			<div class="guanzhu">
				<p>在这里关注我们</p>
				<ul>
					<li><a href="" class="sina"></a><a href="">新浪微博</a></li>
					<li><a href="" class="qq"></a><a href="">腾讯微博</a></li>
					<li><a href="" class="douban"></a><a href="">豆瓣小站</a></li>
					<li><a href="" class="renren"></a><a href="">人人小站</a></li>
					<li class="ewm"><a href="javascript:;" class="weixin"></a><a href="javascript:;">哇塞网官方微信</a><img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/ico/ewm.png"/></li>
				</ul>
			</div>
			<div class="edcode">
				<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/ico/edCode.png" alt="" />
			</div>
		</div>
	</div>
	<!--end-->
	
	<!--底部信息-->
	<div class="bottom fl">
		<div class="footer">
			<div class="footitle fl">
				<p>高端定制上哇塞网</p>
			</div>
			<div class="footernav fl">
				<p class="box">
					<a href="">关于我们</a>
					<a href="">联系我们</a>				
					<a href="">媒体报道</a>				
					<a href="">创意画报</a>				
					<a href="">招贤纳士</a>				
					<a href="">版权保护</a>
					<a href="">用户条款</a>				
					<a href="">隐私声明</a>				
					<a href="">友情链接</a>				
					<a href="">网站地图</a>
					<a href="">帮助中心</a>				
					<a href="">手工客</a>
				</p>
			</div>
			<div class="footermsg fl">
				<p>北京光年创艺信息技术有限公司 WowSai.com Copyright© 2008-2013 [京ICP备10020900][京公网安备11010502026420][京ICP证090011号]</p>
			</div>
			<div class="footerpic fl">
				<div class="botpic">
					<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/ico/bot1.png" alt="" />
					<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/ico/bot2.png" alt="" />
					<img src="http://127.0.0.1/hdwy/wasai/Application/Index/View/Public/images/ico/bot3.png" alt="" />
				</div>
			</div>
		</div>
	</div>
	<!--end-->	
	</body>
</html>
